<template>
	<view class="root">
		<img-slide :imgArr="imgArr" :bgc="bgc"></img-slide>
		<old-detail :lv="lv" :info="info" @changeChoice="change"></old-detail>
	</view>
</template>

<script>
	import imgSlide from "../../../components/ui/tg-img-slide.vue"
	import butt from '../../../components/ui/myButt.vue'
	import slideChoice from '../../../components/ui/tg-slide.vue'
	import oldDetail from '../../../components/ui/old-detail.vue'
	export default {
		components: {
			butt,
			imgSlide,
			slideChoice,
			oldDetail
		},
		data() {
			return {
				bgc: '#33B0FF',
				imgArr: [],
				info:{},
				lv:0
			}
		},
		onLoad(e) {
			var data = JSON.parse(e.item);
			console.log(data)
			this.lv = e.lv
			var pd = data.procData
			this.info = {
				name:pd.sbName,
				gender:pd.sbSex,
				idCard:pd.sbIdcard,
				birthday:pd.sbBirth,
				bankNum:pd.sbBankAccount,
				bank:pd.sbBankAccountType,
				huji:pd.sbAddress,
				xianju:pd.sbSensus,
				pid:data.processId,
				time:data.procApplyTime
			}
			console.log(this.info)
			this.imgArr = [{
				url: data.procData.fileUrl,
				name: '身份证正面'
			}, {
				url: data.procData.reverseFileUrl,
				
				name: '身份证反面'
			}, {
				url: data.procData.nationFileUrl,
				name: '户口本照片'
			}, {
				url: data.procData.personFileUrl,
				name: '证件照'
			}]

		},
		methods: {
			change(e) {
				console.log(e)
				if (e.index == 0) {
					this.bgc = '#33B0FF'
				} else {
					this.bgc = '#FF6B6B'
				}
				console.log(this.bgc)
			}
		}
	}
</script>

<style scoped>
	.root::after {
		content: "";
		width: 700rpx;
		height: 100rpx;
		display: block;
	}
</style>
